// ChCAppernaceDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ChatClient.h"
#include "ChCAppernaceDlg.h"


// CChCAppernaceDlg dialog

IMPLEMENT_DYNAMIC(CChCAppernaceDlg, CDialog)

CChCAppernaceDlg::CChCAppernaceDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CChCAppernaceDlg::IDD, pParent)
{

}

CChCAppernaceDlg::~CChCAppernaceDlg()
{
}

void CChCAppernaceDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}

INT_PTR CChCAppernaceDlg::SetupApperance()
{
	CChCAppernaceDlg dlg;
	return dlg.DoModal();
}

BEGIN_MESSAGE_MAP(CChCAppernaceDlg, CDialog)
	ON_BN_CLICKED(IDC_BUTTON_SYS_MSG, &CChCAppernaceDlg::OnBnClickedButtonSysMsg)
	ON_BN_CLICKED(IDC_BUTTON_IN_MSG, &CChCAppernaceDlg::OnBnClickedButtonInMsg)
	ON_BN_CLICKED(IDC_BUTTON_OUT_MSG, &CChCAppernaceDlg::OnBnClickedButtonOutMsg)
	ON_BN_CLICKED(IDC_BUTTON_TOALL_MSG, &CChCAppernaceDlg::OnBnClickedButtonToallMsg)
END_MESSAGE_MAP()


// CChCAppernaceDlg message handlers

void CChCAppernaceDlg::OnBnClickedButtonSysMsg()
{
	
	CColorDialog dlg(CChCSettings::Instance()->ColorSystemMessages(), CC_FULLOPEN);
	if(IDOK == dlg.DoModal())
	{
		CChCSettings::Instance()->ColorSystemMessages(dlg.GetColor());
	}
}

void CChCAppernaceDlg::OnBnClickedButtonInMsg()
{
	CColorDialog dlg(CChCSettings::Instance()->ColorToMessages(), CC_FULLOPEN);
	if(IDOK == dlg.DoModal())
	{
		CChCSettings::Instance()->ColorToMessages(dlg.GetColor());
	}
}

void CChCAppernaceDlg::OnBnClickedButtonOutMsg()
{
	CColorDialog dlg(CChCSettings::Instance()->ColorFromMessages(), CC_FULLOPEN);
	if(IDOK == dlg.DoModal())
	{
		CChCSettings::Instance()->ColorFromMessages(dlg.GetColor());
	}
}

void CChCAppernaceDlg::OnBnClickedButtonToallMsg()
{
	CColorDialog dlg(CChCSettings::Instance()->ColorToAllMessages(), CC_FULLOPEN);
	if(IDOK == dlg.DoModal())
	{
		CChCSettings::Instance()->ColorToAllMessages(dlg.GetColor());
	}
}
